OCPBUGS-105510: images: add BUILD_VERSION arg - #10781
openshift-merge-bot[bot] merged 1 commit into
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@petr-muller: This pull request references Jira Issue OCPBUGS-105510, which is valid. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (5)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughThe Docker builder stages now declare a ChangesBUILD_VERSION configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change adds an optional BUILD_VERSION value to CI image builds while preserving the existing fallback behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
5d68de9 to
34f9a2d
Compare
|
Supersedes #10771 |
Will allow rehearse-test the changes in openshift/installer#10781 once it lands
|
Test actually passed but Boskos call had a hiccup: |
|
/test openstack-manifests |
1 similar comment
|
/test openstack-manifests |
Add a BUILD_VERSION arg to our CI images, which will be set in the CI environment and then set that as an environment variable to pass to the build scripts. This is similar to the pattern of ART/OSBS. Currently, with BUILD_VERSION unset in CI, we fall back to the git tags. But with 5.0 & 4.23 having identical commits, we need a way to distinguish between the two different builds, in which case we can just adopt the same pattern used by ART/OSBS. The images can be built in three modes: 1. Outside ART but without build arg passed. Build arg `BUILD_VERSION` has a `""` default value, this gets exposed to the `hack/build.sh` as an envvar and the script falls back to using git tags, like before this change. 2. Outside ART, with build arg passed. The passed value will be exposed to the `hack/build.sh` as `BUILD_VERSION` envvar and will prevent the git tag fallback. We will use this mode in selected CI configs to force using a certain version when needed. 3. ART tooling injects `ENV BUILD_VERSION <value>` into Dockerfiles. ENV instructions override ARG ones[1], so ART-built images will correctly use whatever ART injects, no matter if anything passes a value for the build arg or not. [1] https://docs.docker.com/reference/dockerfile/#using-arg-variables Co-authored-by: Petr Muller <muller@redhat.com>
34f9a2d to
5b449cd
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
/pipeline required |
|
Scheduling tests matching the |
|
Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tthvo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified later Sufficiently confident about the PR to merge: images build, CI (mostly 😅 ) passes. Build args passing will be validated via rehearsals. We will need to pay attention to ART builds. |
|
@petr-muller: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/verified later @petr-muller |
|
@petr-muller: This PR has been marked to be verified later by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest-required |
|
/test e2e-gcp-ovn-upi |
|
/cherry-pick release-5.0 |
|
@tthvo: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/test e2e-gcp-ovn-upi |
|
Does e2e-gcp-ovn-upi ever pass? Does not seem like that from the history. I see it is being overriden in other recent PRs like #10769 or #10766 . I have override powers but do not feel appropriate to use them in teams' component repos 😅 @tthvo would you consider an override? |
|
@petr-muller: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/test e2e-gcp-ovn-upi |
|
/override-sticky ci/prow/e2e-gcp-ovn-upi
Yea, some e2e tests failed, but they're unrelated though. Since the image build and install completes, I think that's enough evidence. Let's keep an eye on ART builds after merging 👀 |
|
/skip |
|
@tthvo: Overrode contexts on behalf of tthvo: ci/prow/e2e-gcp-ovn-upi These overrides will persist across retests on the current HEAD SHA. Pushing a new commit will clear them. Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/tide refresh |
|
/override-sticky ci/prow/e2e-gcp-ovn-upi Don't come back |
|
@petr-muller: Overrode contexts on behalf of petr-muller: ci/prow/e2e-gcp-ovn-upi These overrides will persist across retests on the current HEAD SHA. Pushing a new commit will clear them. Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/meow |
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@petr-muller: Jira Issue OCPBUGS-105510: All pull requests linked via external trackers have merged: This pull request has the DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@tthvo: new pull request created: #10801 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Fix included in release 5.1.0-0.nightly-2026-08-25-043742 |
Will allow rehearse-test the changes in openshift/installer#10781 once it lands
Will allow rehearse-test the changes in openshift/installer#10781 once it lands

Add a BUILD_VERSION arg to our CI images, which will be set in the CI environment and then set that as an environment variable to pass to the build scripts. This is similar to the pattern of ART/OSBS.
Currently, with BUILD_VERSION unset in CI, we fall back to the git tags. But with 5.0 & 4.23 having identical commits, we need a way to distinguish between the two different builds, in which case we can just adopt the same pattern used by ART/OSBS.
The images can be built in three modes:
BUILD_VERSIONhas a""default value, this gets exposed to thehack/build.shas an envvar and the script falls back to using git tags, like before this change.hack/build.shasBUILD_VERSIONenvvar and will prevent the git tag fallback. We will use this mode in selected CI configs to force using a certain version when needed.ENV BUILD_VERSION <value>into Dockerfiles. ENV instructions override ARG ones[1], so ART-built images will correctly use whatever ART injects, no matter if anything passes a value for the build arg or not.[1] https://docs.docker.com/reference/dockerfile/#using-arg-variables
Co-authored-by: Petr Muller muller@redhat.com
Summary by CodeRabbit